﻿using System.Collections.Generic;
using ShopB2C.Entity;

namespace ShopB2C.Interfaces {
    /// <summary>
    /// 新闻接口
    /// </summary>
    public interface INews {

        #region News

        /// <summary>
        /// 添加新的新闻
        /// </summary>
        /// <param name="ne">NewsEntity</param>
        void NewsAppend(NewsEntity ne);
        /// <summary>
        /// 修改新闻
        /// </summary>
        /// <param name="ne">NewsEntity</param>
        void NewsUpdate(NewsEntity ne);
        /// <summary>
        /// 删除新闻
        /// </summary>
        /// <param name="newsIds">新闻 id 字符串，“,”分隔</param>
        void NewsDelete(string newsIds);
        /// <summary>
        /// 获取指定 id 的新闻
        /// </summary>
        /// <param name="newsId">新闻 id</param>
        /// <returns>NewsEntity</returns>
        NewsEntity GetNewsById(int newsId);
        /// <summary>
        /// 获取新闻列表
        /// </summary>
        /// <param name="pageSize">每页显示记录数</param>
        /// <param name="pageIndex">当前页号</param>
        /// <param name="pageSize">接收返回的总页数</param>
        /// <returns>List</returns>
        List<NewsEntity> GetNewsList(int pageSize, int pageIndex, out int pageCount);
        /// <summary>
        /// 获取新闻列表
        /// </summary>
        /// <param name="classifyId">新闻分类 id</param>
        /// <param name="pageSize">每页显示记录数</param>
        /// <param name="pageIndex">当前页号</param>
        /// <param name="pageSize">接收返回的总页数</param>
        /// <returns>List</returns>
        List<NewsEntity> GetNewsList(int classifyId, int pageSize, int pageIndex, out int pageCount);
        /// <summary>
        /// 获取新闻列表
        /// </summary>
        /// <param name="classifyId">新闻分类 id</param>
        /// <param name="key">搜索关键字, 在标题中搜索</param>
        /// <param name="pageSize">每页显示记录数</param>
        /// <param name="pageIndex">当前页号</param>
        /// <param name="pageSize">接收返回的总页数</param>
        /// <returns>List</returns>
        List<NewsEntity> GetNewsList(int classifyId, string key, int pageSize, int pageIndex, out int pageCount);

        #endregion

    }
}
